home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
kermit.columbia.edu
/
kermit.columbia.edu.tar
/
kermit.columbia.edu
/
newsgroups
/
misc.20041116-20060924
/
000306_rock_spambust_violin@yahoo.com_Thu Apr 20 10:12:06 2006.msg
< prev
next >
Wrap
Internet Message Format
|
2006-09-27
|
2KB
Path: newsmaster.cc.columbia.edu!newsfeed.nyu.edu!news.maxwell.syr.edu!postnews.google.com!z34g2000cwc.googlegroups.com!not-for-mail
From: "tomviolin" <rock_spambust_violin@yahoo.com>
Newsgroups: comp.protocols.kermit.misc
Subject: speed of script execution
Date: 20 Apr 2006 02:16:13 -0700
Organization: http://groups.google.com
Lines: 39
Message-ID: <1145524573.729587.320320@z34g2000cwc.googlegroups.com>
NNTP-Posting-Host: 67.53.150.18
Mime-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
X-Trace: posting.google.com 1145524580 12008 127.0.0.1 (20 Apr 2006 09:16:20 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 20 Apr 2006 09:16:20 +0000 (UTC)
User-Agent: G2/0.2
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2,gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: z34g2000cwc.googlegroups.com; posting-host=67.53.150.18;
posting-account=ornCOQwAAAAyCG4a7NOAj_SMr54FiqNu
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:15564
Can anyone tell me why there is such a huge time discrepency between
the execution of the following scripts. The only difference is the
curly braces. I'm running on an ARM SBC from a flash drive, if that
makes any difference.
---- testx.ksc ----
#!/usr/bin/kermit +
{ assign \%p 1, set line /dev/ttyAM\%p }
{ close }
exit
---- testy.ksc ----
#!/usr/bin/kermit +
assign \%p 1, set line /dev/ttyAM\%p
close
exit
-- test results --
$ time ./testx.ksc
real 0m 0.60s
user 0m 0.04s
sys 0m 0.06s
$ time ./testy.ksc
real 0m 0.09s
user 0m 0.05s
sys 0m 0.04s
Yes, when I go back and forth between the two scripts, the times of
each stay consistent, so the second one shown above didn't just run
faster because it was second; if I go back and run testx.ksc again, it
takes 0.60s.
Of course "don't use the curly braces" but this is part of a larger
system that I have distilled down to this very simple example, so
that's really not an option.
Any ideas or input would be greatly appreciated.